#include <iostream>
#include <log4c.h>
#include <nocopyable.h>

sg_log_t* log = sg_log4c_init(NULL,SG_ALL);

namespace sg
{
	class Notebook 
	{
	public:
		Notebook();
		Notebook(Notebook& other);
		Notebook& operator=(const Notebook&);
	};

	Notebook::Notebook()
	{
		sg_log4c_write(log,SG_TRACE,"Notebook constructor called");
	}

	Notebook::Notebook(Notebook& other)
	{
		sg_log4c_write(log,SG_TRACE,"Notebook copy-constructor called");
	}

	Notebook& Notebook::operator=(const Notebook& n)
	{
		sg_log4c_write(log,SG_TRACE,"Operator[=] invoked");
		return *this;
	}

	class PrivateNotebook : public sg::Nocopyable
	{};

	class UnitTest 
	{
	public:
		Notebook foo(Notebook n)
		{
			sg_log4c_write(log,SG_TRACE,"UnitTest::foo() called");
			return n;
		}
	};

}

int main()
{
	sg::UnitTest ut;
	sg::Notebook a,b;
	sg::PrivateNotebook p1,p2;
	
	/* it's not correct */
	//p1=p2;  
	
	a = b;
	ut.foo(a);
	return 0;
}



